namespace QMVnSoft.Lists
{
    using QMVnSoft;
    using QMVnSoft.Controls;
    using QMVnSoft.DAL;
    using System;
    using System.ComponentModel;
    using System.Drawing;

    public class FormDmTkLister : FormListLister
    {
        private IContainer components;

        public FormDmTkLister()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            base.SuspendLayout();
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.ClientSize = new Size(0x2bd, 0x10a);
            base.LocalFieldName = "TK";
            base.LocalTableName = "DMTK";
            base.Name = "FormDmTkLister";
            base.OrderFieldNames = "TK";
            base.RefreshAfterChanged = true;
            this.Text = "Danh mục tài khoản";
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        public override bool OnAdd()
        {
            base.LocalFormEditor = new FormDmTkEditor();
            return base.OnAdd();
        }

        public override bool OnEdit()
        {
            base.LocalFormEditor = new FormDmTkEditor();
            return base.OnEdit();
        }

        public override void OnFillData()
        {
            object[][] objArray = new object[14][];
            object[] objArray2 = new object[4];
            objArray2[0] = "Tk";
            objArray2[1] = "Tài khoản";
            objArray2[2] = "C";
            objArray[0] = objArray2;
            object[] objArray3 = new object[4];
            objArray3[0] = "Ten_Tk";
            objArray3[1] = "Tên tài khoản";
            objArray3[2] = "C";
            objArray[1] = objArray3;
            object[] objArray4 = new object[4];
            objArray4[0] = "Tk_Me";
            objArray4[1] = "Tk mẹ";
            objArray4[2] = "C";
            objArray[2] = objArray4;
            object[] objArray5 = new object[4];
            objArray5[0] = "Tk_NT";
            objArray5[1] = "Tk NT";
            objArray5[2] = "C";
            objArray[3] = objArray5;
            object[] objArray6 = new object[4];
            objArray6[0] = "Tk_BP";
            objArray6[1] = "Tk BP";
            objArray6[2] = "C";
            objArray[4] = objArray6;
            object[] objArray7 = new object[4];
            objArray7[0] = "Tk_HD";
            objArray7[1] = "Tk HD";
            objArray7[2] = "C";
            objArray[5] = objArray7;
            object[] objArray8 = new object[4];
            objArray8[0] = "Tk_DT";
            objArray8[1] = "Tk ĐT";
            objArray8[2] = "C";
            objArray[6] = objArray8;
            object[] objArray9 = new object[4];
            objArray9[0] = "Tk_KV";
            objArray9[1] = "Tk KV";
            objArray9[2] = "C";
            objArray[7] = objArray9;
            object[] objArray10 = new object[4];
            objArray10[0] = "Tk_GT";
            objArray10[1] = "Tk GT";
            objArray10[2] = "C";
            objArray[8] = objArray10;
            object[] objArray11 = new object[4];
            objArray11[0] = "Tk_SC";
            objArray11[1] = "Tk SC";
            objArray11[2] = "C";
            objArray[9] = objArray11;
            object[] objArray12 = new object[4];
            objArray12[0] = "Tk_KM";
            objArray12[1] = "Tk KM";
            objArray12[2] = "C";
            objArray[10] = objArray12;
            object[] objArray13 = new object[4];
            objArray13[0] = "Tk_VAT";
            objArray13[1] = "Tk VAT";
            objArray13[2] = "C";
            objArray[11] = objArray13;
            objArray[12] = new object[] { "Bac_Tk", "Cấp", "N", AppInstance.TextNumericFormat.None };
            object[] objArray15 = new object[4];
            objArray15[0] = "Ten_Tk_E";
            objArray15[1] = "Tên tài khoản tiếng Anh";
            objArray15[2] = "C";
            objArray[13] = objArray15;
            base.ColNames = objArray;
            base.OnFillData();
        }

        public override void OnRefresh()
        {
            base.LocalDataSet = new DmTkDataAccess().GetDataSet();
            base.OnRefresh();
        }
    }
}

